#ifndef _MAIN_H_
#define _MAIN_H_
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "bsp_rc522.h"
#include "hash_lock.h"
#include "bsp_dht11.h"
#include "my_wifi.h"
#include "my_mqtt.h"



uint8_t card_KEY1[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; // 默认密码1
uint8_t card_KEY2[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; // 默认密码2

char *special = "cow";
int animal_age = 2;

char card_id[50];
char eat_time[30];       //饮食时间
char io_time[30];        //出入口时间



void rc522_task(void *pvParameters);
void temp_humi_task(void *pvParameters);
void rc522_proc();
void rc522_proc2();
esp_err_t wifi_proc();
void hx711_task(void *pvParameters);
char *get_current_time();
void string_to_byte_array(const char* str, uint8_t* byte_array, size_t max_len);
void byte_array_to_string(const uint8_t* byte_array, char* str, size_t len);
void read_animal_info();
void mqtt_send_info();


#endif
